class Student1{
    public String name;
    public String gender;
    public int age;
    private static int classroom = 113;
    public static int getClassroom(){
        return classroom;
    }

    {
        this.classroom = 114;
        System.out.println("调用了实例化代码块");
    }

    static{
        classroom = 115;
        System.out.println("调用了静态代码块，一般用来初始化成员变量");
    }

    public Student1(String name, String gender, int age) {
        this.name = name;
        this.gender = gender;
        this.age = age;
        System.out.println("构造函数生成了");
    }
}
public class Two {
    public static void main(String[] args) {
        Student1 student = new Student1("zhangsan","男",5);
        System.out.println(student.getClassroom());
    }
}
